package cn.lidongyu.org.mapper;

import cn.lidongyu.basic.AjaxResult;
import cn.lidongyu.org.domain.Department;
import cn.lidongyu.org.query.DepartmentQuery;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface DepartmentMapper {
    @Select("select * from  t_department")
    List<Department> findAll();

    @Select("select * from t_department where id=#{id}")
    Department findOne(Long id);

    void add(Department department);

    @Delete("delete from  t_department where  id=#{id}")
    void delete(Long id);

    void update(Department department);


    Long findCount(DepartmentQuery departmentQuery);

    List<Department> findByQuery(DepartmentQuery departmentQuery);
    void deletemore(List<Long> ids);


}
